import request from '@/libs/axios'

export const addWorkspace = params => {
  return request({
    url: '/workspace',
    method: 'post',
    data: params
  })
}

export const editWorkspace = params => {
  return request({
    url: '/workspace/' + params.id,
    method: 'put',
    data: params
  })
}

export const deleteWorkspace = params => {
  return request({
    url: '/workspace/' + params.id,
    method: 'delete',
    data: params
  })
}

export const getWorkSpaceList = params => {
  return request({
    url: '/workspace',
    method: 'get',
    params: params
  })
}

export const postWorkSpaceUser = params => {
  return request({
    url: '/workspace/user',
    method: 'post',
    data: params
  })
}

export const getWorkSpaceUser = params => {
  return request({
    url: '/workspace/user',
    method: 'get',
    params: params
  })
}

export const deleteWorkSpaceUser = params => {
  return request({
    url: '/workspace/user/' + params.id,
    method: 'delete',
    data: params
  })
}

